Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MetadataType Attribute #140

Closed
wants to merge 13 commits into from

Conversation

digitalsigi
Copy link

Adds support from MetadataType Attribute, see #40

According to https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.metadatatypeattribute?view=net-9.0#remarks

  • The MetadataType attribute can only applied to a class
  • The attribute cannot be inherited by derived classes.
  • can only applied once
  • Netstandard 2.0 or below is not supported

Changed code replaces the PropertyInfo from base class with PropertyInfo property of MetadataType for equal named properties.

@github-actions github-actions bot added documentation Improvements or additions to documentation tests Pull request that adds new or changes existing tests labels Dec 18, 2024
@sungam3r sungam3r linked an issue Dec 18, 2024 that may be closed by this pull request
README.md Outdated Show resolved Hide resolved
Fine with me

Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
README.md Outdated Show resolved Hide resolved
Thank you. Much better explaination! Actually this is my first contribution to such a project...

Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
README.md Outdated Show resolved Hide resolved
…gPolicyOptions.cs


Fine with me

Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
@sungam3r
Copy link
Member

@digitalsigi I suggest you to take my changes from destructurama:metadata into your branch and retarget it to master so you will be the author of changes. I want to close my PR.

@digitalsigi
Copy link
Author

I'll be glad to do so, but need first to find out how to do that. I am not so experienced in this corner ...

digitalsigi and others added 3 commits December 22, 2024 16:40
…gPolicyOptions.cs

Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…gPolicyOptions.cs

Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
Need additional review

Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
@digitalsigi
Copy link
Author

I managed to create a new branch 'metadatatype' in my forked repo. Is it OK to open a new PR or do I have to do other things before?

@sungam3r
Copy link
Member

Up to you.

@digitalsigi
Copy link
Author

Up to you.

I created a new branch and submitted a new PR. In this PR i saw a conflict but have no idea how to resolve. It looks like that there are changes in both master and PR. Could you please help me here? Thank you in advance

@sungam3r
Copy link
Member

Replaced by #142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation tests Pull request that adds new or changes existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants